import request from "@/utils/request";

/**
 * 获取标签
 * @returns {Promise<any>}
 */
export const getLabelData = async (data) => {
  const option = {
    params:data
  }
  return request.get('/admin/label',option);
}
/**
 * 添加标签
 * @returns {Promise<any>}
 */
export const addLabels = async (data) => {
  return request.post('/admin/label',{data});
}
/**
 * 修改标签
 * @returns {Promise<any>}
 */
export const updateLabel = async (id,data) => {
  return request.put(`/admin/label/${id}`,{data});
}
/**
 * 删除标签
 * @returns {Promise<any>}
 */
export const delLabelList = async (id) => {
  return request.delete(`/admin/label/${id}`);
}
/**
 * 获取标签详情
 * @returns {Promise<any>}
 */
export const getLabelDetail = async (id) => {
  return request.get(`/admin/label/${id}`)
}
